<html>
    <head>
        <title>紫禁阁</title>
        <script type="text/javascript" src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
        <!-- <script type="text/javascript" src="/public/jquery&#45;3.2.1.js"></script> -->
    </head>

    <body>
        <center>
            <h1>欢迎大家访问我的个人主页</h1>
            <hr>
        </center>

        <form name="login" method="post">
            <h1>用户注册</h1>

            <table width="0" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td>用户名：</td>
                    <td><input type="text" name="username"/></td>
                </tr>

                <tr>
                    <td>密码： </td>
                    <td><input type="password" name="password"/></td>
                </tr>

                <tr>
                    <td>确认密码：</td>
                    <!-- <td><input type="password" name="confirmpass"/></td> -->
                    <td><input type="password" name="repassword"/></td>
                </tr>

            </table>

            <input type="submit" value="注册" onclick="return login()" />
        </form>
    </body>

    <script type="text/javascript">
        function login() {
            if(form.username.value == '') {
                alert('请输入用户名');
            }

            if(form.password.value == '') {
                alert('请输入密码');
            }

            alert('test');
            $.ajax({
                type:'post',
                url:"http://121.42.202.112/user/user",
                data:{username:username,password:password,repassword:repassword},
                success:function(data, textStatus, jqXHR){
                    alert('发送成功');
                },
            });
        }

    </script>
</html>
<!-- <tr> -->
<!--     <td>电子邮箱：</td> -->
<!--     <td><input type="text" name="Email"/></td> -->
<!-- </tr> -->
<!--  -->
<!-- <tr> -->
<!--     <td>性别：</td> -->
<!--     <td><input type="radio" name="gender" value="1" checked/>男 -->
<!--         <input type="radio" name="gender" value="0"/>女</td> -->
<!-- </tr> -->
<!--  -->
<!-- <tr> -->
<!--     <td>学历：</td> -->
<!--     <td> -->
<!--         <select name="education">  -->
<!--             <option value="&#45;1" selected>&#45;&#45;&#45;请选择&#45;&#45;&#45;</option> -->
<!--             <option value="0">小学</option> -->
<!--             <option value="1">初中</option> -->
<!--             <option value="2">高中</option> -->
<!--             <option value="3">大学</option> -->
<!--             <option value="4">研究生</option> -->
<!--             <option value="5">博士</option> -->
<!--             <option value="6">神</option> -->
<!--         </select> -->
<!--     </td> -->
<!-- </tr> -->
<!--  -->
<!-- <tr> -->
<!--     <td>爱好: </td> -->
<!--     <td> -->
<!--         <input type="checkbox" name="favorite" value="read"/>读 -->
<!--         书 -->
<!--         <input type="checkbox" name="favorite" value="music"/>音 -->
<!--         乐 -->
<!--         <input type="checkbox" name="favorite" -->
<!--         value="internet"/>上网 -->
<!--         <input type="checkbox" name="favorite" -->
<!--         value="shopping"/>购物 -->
<!--         <input type="checkbox" name="favorite" value="movie"/>电 -->
<!--         影 -->
<!--     </td> -->
<!-- </tr> -->
<!-- <tr> -->
<!--     <td> -->
<!--         上传头像 -->
<!--     </td> -->
<!--     <td> -->
<!--         <input type="file" name ="pixture"/> -->
<!--     </td> -->
<!-- </tr> -->
<!--  -->
<!-- <tr> -->
<!--     <td> -->
<!--         ` -->
<!--     </td> -->
<!-- </tr> -->
<!-- <tr> -->
<!--     <td>服务协议: -->
<!--     </td> -->
<!--     <td> -->
<!--         <textarea rows="10" cols="30"> -->
<!--             吊炸天的条款 -->
<!--         </textarea> -->
<!--     </td> -->
<!-- </tr> -->
<!-- <tr> -->
<!--     <td> -->
<!--         是否接受协议 -->
<!--     </td> -->
<!--     <td> -->
<!--         <input type="checkbox" name="hope to obey" checked/> -->
<!--     </td> -->
<!-- </tr> -->
<!-- <tr> -->
<!--     <td colspan="2"><input type="submit" value="注册"/> -->
<!--         <input type="submit" value="取消"/> -->
<!--     </td> -->
<!-- </tr> -->

